<?php
include '../db_functions/database.php';
$connection=Connect();	
$user_name = $_POST["user_name"];
$user_surname = $_POST["user_surname"];
$user_address = $_POST["user_address"];
$user_email = $_POST["user_email"];
$user_phone = $_POST["user_phone"];
$user_username = $_POST["user_username"];
$user_password = $_POST["user_password"];
$user_role = $_POST["user_role"];
$query="INSERT INTO users (user_name, user_surname, user_address,user_email,user_phone,user_username,user_password,user_role)
VALUES ('".$user_name."', '".$user_surname."', '".$user_address."','".$user_email."','".$user_phone."','".$user_username."','".$user_password."','".$user_role."')";
if (!mysql_query( $query, $connection ))
	die( 'Error: ' . mysql_error() );
	
header( 'Location: ../views/user_management.php' ) ;
?>